import request from '@/utils/request'

export function createOrganization(data) {
  return request({
    url: '/organization/create',
    method: 'POST',
    data
  })
}

export function getOrganizaitons(params) {
  return request({
    url: '/organizations',
    method: 'GET',
    params
  })
}

export function getOrganization(id) {
  return request({
    url: `/organization/${id}`,
    method: 'GET'
  })
}

export function updateOrganization(data) {
  return request({
    url: `/organization/update`,
    method: 'PUT',
    data
  })
}

export function deleteOrganization(id) {
  return request({
    url: `/organization/${id}`,
    method: 'DELETE'
  })
}
